<?php
require_once './../class/Employee.inc';
require_once './../class/Vehicle.inc';
require_once './../class/DailyReport.inc';
require_once './../class/MonthlyReport.inc';

$table = $_POST ['table'];
$op1 = $_POST ['op1'];
$text = $_POST ['text'];
$p1val = $_POST ['p1val'];
$p2val = $_POST ['p2val'];

if ($table == "1") {
	$employee = new Employee ();
	$employee->search4table ( true, $table, $op1, $text );
} else if ($table == "2") {
	$vehicle = new Vehicle ();
	$vehicle->search4table ( $table, $op1, $text );
} else if ($table == "3") {
	$dailyReport = new DailyReport ();
	$dailyReport->search4table ( false, $p1val, $p2val, $op1, $text );
} else if ($table == "4") {
	$monthlyReport = new MonthlyReport ();
	$monthlyReport->search4table ( $table, $p1val, $p2val, $op1, $text );
}

?>